package com.zhangkun.springboot.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.*;

/**
 * @author: zhangkun
 * @date: 2017/7/3 18:27
 * @description:
 */
@RestController
@EnableAutoConfiguration
public class Controller {

    @Value("${student.sid}")
    private String sid;

    @Value("${student.sname}")
    private String sname;

    //    @RequestMapping("/")
    @GetMapping("/")
    public String home() {
        return "Hello World!，这是home, config info: " + sid + sname;
    }

    @GetMapping("/hello/{myName}")
    public String index(@PathVariable String myName) {
        return "Hello " + myName + "!!!";
    }
}
